import { createRouter, createWebHistory } from "vue-router";

export const routes = [
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/home",
    name: "首页",
    component: () => import("../views/home/index.vue"),
  },
  {
    path: "/login",
    name: "登录",
    component: () => import("../components/login.vue"),
  },
  {
    path: "/mouse",
    name: "指针变大图",
    component: () => import("../components/change-mouse.vue"),
  },
  {
    path: "/guaguale",
    name: "刮刮乐",
    component: () => import("../components/scratch/index.vue"),
  },
  {
    path: "/Transition",
    name: "动画",
    component: () => import("../components/transition.vue"),
  },
  {
    path: "/divTransition",
    name: "div转canvas",
    component: () => import("../components/div-transition-canvas.vue"),
  },
  {
    path: "/:pathMatch(.*)*",
    name: "404",
    component: () => import("../views/404.vue"),
  },
];

export const router = createRouter({
  history: createWebHistory(),
  routes: routes,
});
